//
//  MineFirstCell.m
//  EasyToTesco2.0
//
//  Created by 杨森 on 16/6/8.
//  Copyright © 2016年 EasyToTesco. All rights reserved.
//

#import "MineFirstCell.h"

@implementation MineFirstCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.mineImg = [[UIImageView alloc] init];
        self.mineImg.backgroundColor = DEFAULT_COLOR;
        _mineImg.contentMode = UIViewContentModeCenter;
        _mineImg.layer.cornerRadius = self.Height/4;
        _mineImg.layer.masksToBounds = YES;
        [self.contentView addSubview:_mineImg];

        
        self.mineLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_mineLabel];
        _mineLabel.font = [UIFont systemFontOfSize:15];
        
        _PayBtn = [[UIButton alloc] init];
        [self.contentView addSubview:_PayBtn];
        
        
        
        [self.mineImg mas_makeConstraints:^(MASConstraintMaker *make) {
        
            make.left.equalTo(self.mas_left).with.offset(15);
            make.centerY.equalTo(self.mas_centerY);
            make.width.height.mas_equalTo(self.Height/2);
        }];
        
        [self.mineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.centerY.equalTo(self.mas_centerY);
            make.left.equalTo(_mineImg.mas_right).with.offset(15);
        }];
        
        [_PayBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        
            make.centerY.equalTo(self.mas_centerY);
            make.width.mas_equalTo(80);
            make.right.equalTo(self.mas_right).with.offset(-10);
        }];
        
        
    }
    return self;
}

@end
